﻿@inject IHttpService _httpService


<div class=" p-3">
    <div  class="a-font-color h-100" style="display:flex;align-items: center;">
        <div style="display: flex;align-items: center;">
            <div class="swal2-icon m-0 me-1 @("border-"+color)" style="height: 3em; width: 3em; display: flex;align-items: center;">
                <div class="@("text-"+color)">@Model.Grade.ToString("0.0")</div>
            </div>
        </div>
        <div  class="comment-tx-div" style="height: 3.5em;">
            <div  class="new-row-warp no-margin">
                <div class="@("comment-tag me-2 bg-"+color)">@Model.Level.GetDisplayName()</div>
                <div class="comment-username me-2">@ToolHelper.GetPerfectionCheckTitle(Model)</div>
            </div>
            <div class="comment-time">@ToolHelper.GetPerfectionCheckContext(Model)</div>
        </div>
    </div>
</div>



@code {
    [Parameter]
    public PerfectionCheckViewModel Model { get; set; } = new PerfectionCheckViewModel();

    string color = "success";

    protected override async Task OnInitializedAsync()
    {
        color = ToolHelper.GetEntryPerfectionCheckLevelColor(Model.Level);
    }
}
